1. Field of the Invention
The invention relates generally to improvements in digital-to-analog (D-to-A) conversion, and, more particularly, to improvements in such conversion for audio signals. It is most useful in high quality audio for music reproduction in devices such as Compact Disc (CD) players, DVD players, etc.
2. Description of Related Art
Essentially all modem analog-to-digital (A-to-D) and D-to-A converters used for audio operate at a sample rate higher than the output/input sample rate. These converters are known as over-sampling converters, and they use digital filters to decimate down to the output sample rate in the case of A-to-D converters and to interpolate up from the input sample rate in the case of D-to-A converters. An important reason for this configuration is that filters are necessary to minimize distortions present in both A-to-D and D-to-A conversion processes caused by unwanted frequencies, and digital filters are more stable, more reproducible, and less expensive to implement than analog filters of an equivalent quality. FIG. 1a is a simplified block diagram of an A-to-D converter and FIG. 1b is a simplified block diagram of a corresponding D-to-A converter.
The actual sampling rate for the converters themselves in over-sampling digital converters may be many times higher than the input/output sample rate. The decimation or interpolation process is normally done in several stages, with the last decimation filter and the first interpolation filter normally done with a two-to-one frequency ratio. These filters for the last/first operations have the most effect on the sonic performance of audio converters because their cutoff frequencies are close to the frequencies in the program material. FIG. 2a shows the frequency response of a typical filter used in an A-to-D converter as the final decimation filter. FIG. 2b shows the response of a typical filter used in a D-to-A converter as the first interpolation filter. The Y-axis of the graphs shows the magnitude of the amplitude response of the filters in decibels, and the X-axis shows the frequency as a fraction of the output/input sampling rate, Fs. The reason that we need to examine both the A-to-D and D-to-A filters is that they function as a system in determining the effects of several distortions in the output signal 180 (FIG. 1b).
The frequency 0.5 in the middle of the graphs (FIGS. 2a and 2b), the Nyquist frequency, has a special significance. It is important because the sampling theorem states that in a sampled data system, frequencies above one half the sampling frequency cannot be uniquely represented by the sampled data stream, in the case of the A-to-D converter, any frequencies above the Nyquist frequency in the input signal that are not removed by the decimation filter appear as spurious frequencies in the output known as alias frequencies or alias distortion. The ideal decimation filter from an alias distortion perspective would pass all frequencies below 0.5 Fs and no energy above a frequency of 0.5 Fs. Such a filter is not realizable in practice, but practical filters usually try to approximate the ideal response. Any residual frequencies above Nyquist in the original signal fold over or alias into frequencies below Nyquist in the output signal 120 (FIG. 1a), with the relationship that a frequency f in the input 90 becomes Fs-f in the output 120.
An alias distortion mechanism also exists in D-to-A converters in the interpolation process. The incoming digital signal 122 (FIG. 1b) can be considered to have no frequencies above 0.5 Fs. The first stage of interpolation consists of adding zero value samples in between each of the original samples to double the sample rate and then passing the result through a low pass filter with a frequency response such as in FIG. 2b. The result is that the zero valued samples are replaced by values that are interpolated from the surrounding data.
The distortion arises from the fact that new frequencies are created above the original Nyquist frequency and that these new frequencies correspond to frequencies present in the original signal. In order to analyze the potential impact of this distortion, it is useful to graph the composite frequency response of the decimation/interpolation system. If one takes the frequency response of the A-to-D decimation filter in FIG. 2a and performs the equivalent decimation followed by inserting the zero value samples prior to the interpolation filter, one gets a frequency response shown in FIG. 3a. For each frequency below the Nyquist 200, a new frequency above Nyquist is created. These have the same relationship, i.e., f_new equals FS-f, that alias products have in the A-to-D case, as can be seen from the symmetry about Nyquist 200. These new frequencies, f_new, are uniquely represented because the sampling rate is now twice as great.
If one now adds the cascade of the interpolation filter response of FIG. 2b, one gets the composite response shown in FIG. 3b. The frequencies above 0.5 are signals which were not there in the original signal and are alias distortion products. They fall into two general groups: those corresponding to the stop band of the interpolation filter 220, and those associated with the transition band behavior of both the decimation and interpolation filters 210.
Many people consider these distortion products to be of little importance because they are extra signals above the band of interest and are inaudible in the case of a CD or any other system with a sampling rate greater than 40 kHz. If everything in the audio system following the interpolation filter were really linear, this would be true. Unfortunately, the real world is not strictly linear. Non-linearities exist in the D-to-A converter, small signal amplifiers, power amplifiers, loudspeakers, and even human hearing.
In FIG. 3b, the acceptable level of stop band distortion products 220 determine the stop band performance requirement for the interpolation filter. The only way to reduce these distortions is to improve the performance of the interpolation filter stop band rejection.
The transition band distortions at 210 are more limited in frequency range, but they have much higher amplitude and can cause really audible problems in the output of a system. As an example, consider a cymbal crash in music, which generates large amplitude high frequency components. For each component just below Nyquist, there is a corresponding one at a mirror image frequency above Nyquist, and each pair of original frequency and alias frequency will generate a difference component when it encounters a non-linearity later in the system. In the case of a CD system with these filters, these difference components are in the frequency range of 0 to 5 kilohertz, where human hearing is very sensitive and where they are not masked very well by the signal that created them. They result in a xe2x80x9cdirtyxe2x80x9d sound to the cymbals, which is very typical of digital systems.
Transition band distortions 210 result primarily from the transition band behavior of the interpolation filter. The type of filter that is normally used in this position in a system design is called a half-band filter. As can be seen from FIG. 2b, it is 6 dB down at Nyquist with considerable response above the 0.5 frequency. It is used in most systems because it is very economical to implement computationally, and because it has good time domain behavior. It is a symmetrical finite impulse response (FIR) filter with linear phase response in which all even order coefficients except the middle one are exactly zero, and therefore, those multiplications do not have to be performed. This type of filter is used on the vast majority of commercial D-to-A converters designed for audio use.
A prior art approach to solving the problems associated with half-band interpolation filters is covered in U.S. Pat. Nos. 5,479,168 and 5,808,574 and related materials. The solution that is optimal from a performance point of view is to use an interpolation filter which starts to attenuate at a lower frequency and is therefore not a half-band filter. It is possible to dramatically reduce the amplitude of the transition band alias components 210 while still maintaining good time domain impulse response by using a filter which is complementary to the decimation filter used in the A-to-D converter. It is also possible to control the stop band performance to any desired level. This approach has two major disadvantages in many commercial applications.
The first disadvantage is cost. The complexity of a non-half-band filter appropriate for this application is usually more than twice as great as the corresponding conventional half-band filter. This translates directly into silicon area, and hence cost, in a hardware implementation.
The second disadvantage is that the output sample rate of the better interpolation filter is two times the Fs of the input and a D-to-A converter following the filter must be able to accept the higher sampling rate. Since most converters used in modern equipment are really combination filter/D-to-A converters they may not accept the higher sample rate.
Briefly, and in general terms, the present invention provides a method for and a system of processing a digitally encoded signal that eliminates a type of alias distortion arising from the transition band behavior of half-band interpolation filters commonly used in D-to-A converters. The invention also provides a method for designing filters that reduce alias distortion for use with D-to-A converters.
In a first aspect, the invention involves a method of processing an analog signal. The method includes the steps of converting the analog signal to a digital signal using an analog-to-digital converter, filtering the digital signal using a digital decimation filter having an associated frequency response and subsequently filtering the digital signal through a digital interpolation filter having an associated frequency response. In accordance with the present invention, the method further includes the step of, prior to filtering the digital signal through the digital interpolation filter, locating the transition band portion of the frequency response resulting from the combination of the digital decimation filter frequency response and the digital interpolation filter frequency response and attenuating the digital signal in a frequency range generally corresponding to the transition band portion.
By attenuating the digital signal in this manner and prior to filtering the digital signal through the interpolation filter, the method of the present invention substantially eliminates the transition-band alias distortion associated with presently known D-to-A conversion processes without altering the interpolation filtering process itself.
In a detailed aspect of the invention, the method further includes the step of performing additional signal processing on the digital signal prior to the step of attenuating the digital signal in a frequency range generally corresponding to the transition band portion. In another detailed facet, the method further includes the steps of performing data compression on the digital signal after the step of filtering the digital signal using a digital decimation filter. Further included is the step of subsequently performing data expansion of the digital signal prior to the step of attenuating the digital signal in a frequency range generally corresponding to the transition band portion.
In a second aspect, the invention is related to a system for processing an analog signal. The system includes an analog-to-digital converter responsive to the analog signal for converting the analog signal to a digital signal. The system also includes a digital decimation filter having an associated frequency response. The digital decimation filter is responsive to the digital signal for producing a decimated digital signal. The system also includes a digital interpolation filter having an associated frequency response. In accordance with the present invention, the system further includes an alias correction filter that is responsive to the decimated digital signal for producing an alias-corrected signal. The alias correction filter has a frequency response that attenuates the decimated digital signal in a frequency range generally corresponding to a distortion portion that is present within the combination of the digital decimation filter frequency response and the digital interpolation filter frequency response. The digital interpolation filter is responsive to the alias-corrected signal for producing an interpolated digital signal.
In a detailed aspect of the invention, the digital decimation filter includes a series of individual digital decimation filters and the distortion portion of the frequency response is present within the frequency response resulting from the combination of the frequency response of the last digital decimation filter in the decimation-filter series and the digital interpolation filter frequency response. In another detailed facet, the digital interpolation filter includes a series of individual digital interpolation filters and the distortion portion of the frequency response is present within the frequency response resulting from the combination of the frequency response of the first digital interpolation filter in the interpolation-filter series and the digital decimation filter frequency response. In yet another detailed aspect the system further includes a signal processor responsive to the alias corrected signal for providing a processed alias-corrected signal. In still another detailed facet, the system further includes a data compressor responsive to the decimated digital signal for performing data compression on the signal and a data expander responsive to the compressed decimated digital signal for performing data expansion on the signal.
In a third facet, the invention involves a method of processing a digital signal converted from an analog signal. The digital signal is converted using a digital decimation filter having an associated frequency response. The method includes the steps of filtering the digital signal through a digital interpolation filter having an associated frequency response. In accordance with the present invention, the method further includes the step of locating a distortion band portion of the frequency response resulting from the combination of the digital decimation filter frequency response and the digital interpolation filter frequency response and attenuating the digital signal in a frequency range generally corresponding to the located distortion band portion. This attenuation is preformed prior to the step of filtering the digital signal through the digital interpolation filter.
In a detailed aspect of the invention, at least one of a plurality of signal processing characteristics are encoded in the digital signal and the method further includes the step of decoding the signal processing characteristic from the digital signal. This decoding is performed prior to the step of attenuating the digital signal in a frequency range generally corresponding to the distortion band portion. The signal processing characteristic is selected from the plurality of signal processing characteristics based on a hidden code carried by the digital signal.
In a fourth aspect, the invention is related to a system for processing a decimated digital signal converted from an analog signal using a digital decimation filter having an associated frequency response. The system includes a digital interpolation filter having an associated frequency response and an alias correction filter responsive to the decimated digital signal for producing an alias-corrected signal. The alias correction filter has a frequency response that attenuates the decimated digital signal in a frequency range generally corresponding to a distortion band portion that is present within the combination of the digital decimation filter frequency response and the digital interpolation filter frequency response. The digital interpolation filter is responsive to the alias-corrected signal for producing an interpolated digital signal.
In a fifth aspect, the invention is related to a method of processing a digital signal converted from an analog signal using a selected one of a plurality of digital decimation filters, each having an associated frequency response. The decimation filter is selected based on a hidden code carried by the digital signal. The method includes the steps of providing a digital interpolation filter and providing a plurality of individually selectable alias correction filters. Each alias correction filter is designed to attenuate a digital signal in a frequency range corresponding to a distortion band portion that is present in the frequency response resulting from the combination of the frequency response of one of the digital decimation filters and the frequency response of the digital interpolation filter. The method further includes the step of selecting one of the alias correction filters based on the hidden code, filtering the digital signal through the selected alias correction filter and filtering the digital signal through the digital interpolation filter.
In a sixth facet, the invention is related to a system for processing a digital signal converted from an analog signal using a selected one of a plurality of digital decimation filters, each having an associated frequency response. The choice of decimation filter is conveyed in a hidden code carried by the digital signal. The system includes a digital interpolation filter and a plurality of individually selectable alias correction filters, each of which are designed to attenuate a digital signal in a frequency range corresponding to a distortion band portion. The distortion band portion is present in the frequency response that results from the combination of the frequency response of one of the digital decimation filters and the frequency response of the digital interpolation filter. The system further includes a selector responsive to the hidden code for selecting one of the alias correction filters. In accordance with the present invention, the selected alias correction filter is responsive to the digital signal prior to the digital interpolation filter.
In a seventh aspect, the invention is related to a method of designing a filter that reduces alias distortion for use in processing a digital signal which has been converted from an input analog signal using an analog-to-digital converter having a digital decimation filter. The digital signal being subsequently converted to an output analog using a digital-to-analog converter comprising a digital interpolation filter. Each of the decimation and interpolation filters have an associated frequency response. The method includes the steps of a) locating a distortion band portion of the frequency response resulting from the combination of the digital decimation filter frequency response and the digital interpolation filter frequency response; b) selecting a first attenuation filter having a first frequency response that attenuates the digital signal in the frequency range generally corresponding to the distortion band portion; c) convolving the impulse responses of the decimation filter and the interpolation filter to produce a first impulse response; and d) convolving the impulse responses of the decimation filter, the attenuation filter and the interpolation filter to produce a second impulse response.
The method further includes the steps of e) comparing the time dispersion of the second impulse response in the most sonically significant region with the time dispersion of the first impulse response in the same region; f) if the width of the second-impulse-response time dispersion in the most sonically significant region is generally greater than the width of the first-impulse-response time dispersion in the same region, selecting another attenuation filter having a frequency response different then the first frequency response, that attenuates the digital signal in the frequency range generally corresponding to the distortion band portion; and g) repeating steps d, e and f until the width of the second-impulse-response time dispersion in the most sonically significant region is no greater than the width of the first-impulse-response time dispersion in the same region.
By considering both the frequency-domain response and time-domain response of the system when designing an alias-distortion reduction filter, the present invention can eliminate the alias distortion associated with D-to-A converters without significantly changing the time-domain response of the system.
In a detailed aspect of the invention, the convolved impulse response is plotted on a logarithmic scale. In another detailed facet, the most sonically significant region of the convolved impulse response is the region above minus 80 dB. In yet another detailed aspect, the higher amplitude regions of the first and second impulse responses are considered to be more sonically significant.